package com.zjdiepu.www.commpent.mapper.dh;

import javax.annotation.Resource;

import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.stereotype.Component;

import com.zjdiepu.www.base.core.BaseMapper;
import com.zjdiepu.www.base.enums.type.DataDicType;
import com.zjdiepu.www.commpent.RedisObjectClient;
import com.zjdiepu.www.model.base.dto.SimpleDataDictionary;
import com.zjdiepu.www.model.dh.dto.DhLoanAfter;
/**
 * 项目名称：dpqc-parent-manager-information <br/> 
 * 类名称：YwBusinessMapper <br/>  
 * 类描述：贷后信息登记 <br/>    
 * 创建人：xiongxiaotun <br/> 
 * 创建时间：2017年4月25日 下午5:51:41  <br/>   
 * 修改人：xiongxiaotun <br/> 
 * 修改时间：2017年4月25日 下午5:51:41   <br/>  
 * 修改备注：    <br/> 
 * @version V1.0   <br/>
 */
@Component
public class DhLoanAfterVoMapper extends BaseMapper<DhLoanAfter>{
	@Resource
	private RedisObjectClient redisObjectClient;
	@Override
	public void mapper(RedisConnection redisConnection,DhLoanAfter m) {
		if(null == m) {
			return;
		}
		String companyExpress = m.getCompanyExpress();
		SimpleDataDictionary simpleDataDictionary = redisObjectClient.hGet(redisConnection, SimpleDataDictionary.class.getSimpleName(),companyExpress, DataDicType.EXPRESS_COMPANY.getCode());
		m.setCompanyExpressDisplay(simpleDataDictionary == null ? "" : simpleDataDictionary.getName());
	}
}
